-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS12 Support #117
CS12 Support #117
Conversation
Some minor cleanup still planned, this is just a preliminary PR. |
\cc @lamont-granquist @danielsdeleo @stevendanna @jtimberman per the Chef maintainers file |
Oops, thanks @tyler-ball |
Also @jkeiser |
I would like to get this merged in as soon as is reasonably possible - at this point the merged oc-chef-pedant is on master, and chef-pedant has been deprecated. While current master of chef-zero will continue to work as-is because chef-pedant is pinned to a version, all new tests will be getting added to oc-chef-pedant. |
8698f90
to
59239b5
Compare
Note I am out this week. |
@@ -20,29 +20,7 @@ def delete(request) | |||
json_response(200, ChefData::DataNormalizer.normalize_user(user, request.rest_path[3], ['username'], server.options[:osc_compat])) | |||
end | |||
|
|||
def post(request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than removing this I think we need to move it and slightly change this code. The actual endpoint that does this is:
POST /organizations/ORGNAME/users
with a body of {"username": "USERTOADD"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the Chef Server support both endpoints? POST /organizations/ORGNAME/users
and POST /organizations/ORGNAME/users/USER
? If we want chef-zero to emulated CS12 I would think we want want it to do whatever CS12 does. I'm not sure when the endpoint was changed so I don't know when the old one was deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current chef server only support POST /organization/ORGNAME/users/
. I don't think there is a version that supports POST /organizations/ORGNAME/users/USER
but I haven't look extensively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved this in andrewjamesbrown@0447018 which is part of #146
@@ -65,7 +65,13 @@ def put(request) | |||
else | |||
response = FFI_Yajl::Parser.parse(result[2], :create_additions => false) | |||
end | |||
response['private_key'] = private_key if private_key | |||
|
|||
if request.rest_path[2] == 'clients' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super confusing branching logic - I would expect to see actor_endpoint_spec.rb
updated. Unless all the testing is through pedant?
Just as side note - if this removes CS11 functionality this should be released as a major version update. And it looks like you're doing that as I just saw in the Changelog :) Thanks! |
@@ -3,7 +3,7 @@ gemspec | |||
|
|||
gem 'rest-client', :github => 'opscode/rest-client' | |||
|
|||
gem 'chef-pedant', :github => 'opscode/chef-pedant', :tag => '1.0.46' | |||
gem 'oc-chef-pedant', :github => 'opscode/oc-chef-pedant', :tag => '2.0.0' | |||
|
|||
gem 'chef', :github => 'opscode/chef', :tag => '12.1.0.rc.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be updated to 12.3.0 (or at least not the RC version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in #146
Is this stalled? We would like to see it merged so we could get chef/cheffish#50 merged. |
@tyler-ball, hopefully I've addressed the concerns. I'm also keen to see chef/cheffish#50 merged. Thanks! |
This commit re-adds support for POST /organizations/ORGNAME/users. Since the code is very similar to /organizations/ORG/association_requests, we introduced a helper module to avoid code duplication.
399c389
to
113e41e
Compare
I just did a rebase on master and force-pushed |
Poking this - I think the only task left to do is update the gemspecs to depend on pedant from the chef-server repo, then test against that. @marcparadise do you agree? |
Yes, looks like it.
|
Use the embedded pedant in the chef-server repo. This also requires slight changes to the pedant configuration, as the options have changed.
I've updated the gemspecs in #151. Note that there are a number of failed tests now: 1366 examples, 130 failures, 19 pending |
@tyler-ball, I think the remaining task is complete, but I'm a little concerned that there are now some failed tests with Chef12. Please let me know if there is anything else I can help with. |
Switch to pedant in chef-server repo
@andrewjamesbrown Unfortunately it means that chef-zero probably needs to be updated to bring its behavior in line with CS 12 still. @marcparadise do you have time to look at the failures? |
Chef Zero does not yet 100% support CS12, hence we need to disable several of the failing tests until the code is written.
Adding preliminary support for the _identifiers REST endpoint.
@tyler-ball, @marcparadise I've submitted #152 that makes the build pass. I've removed several of the failing tests from the pedant config, and added a new _identifiers endpoint. |
@tyler-ball unfortunately I'm tied up with other projects and DoD Pittsburgh for the remainder of the week. @andrewjamesbrown thanks for the PR to get past the errors! |
I've opened issue #154 to cover server API versioning behaviors. |
Andrewjamesbrown/gemspecs
This PR brings chef-zero behaviors in line with CS12 as of 12.0.5
It also removes support for chef-pedant, because the repositories oc-chef-pedant and chef-pedant are being merged.
Some of these changes (specifically around admin and private key flags in clients)are not backwards compatible with OSC11 behaviors.